// ToolBox.cpp : implementation file
//

#include "stdafx.h"
#include "Draw.h"
#include "DrawDoc.h"
#include "DrawView.h"
#include "ToolBox.h"


#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CToolBox

BEGIN_MESSAGE_MAP(CToolBox, CToolBar)
	//{{AFX_MSG_MAP(CToolBox)
	ON_WM_CREATE()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CToolBox message handlers

int CToolBox::OnCreate(LPCREATESTRUCT lpCreateStruct) 
{
	if (CToolBar::OnCreate(lpCreateStruct) == -1)
		return -1;

	//
	// Load the toolbar.
	//
	if (!LoadToolBar(IDR_TOOLBOX))
		return -1;

	// set the wraping of the tool bar :
	SetButtonStyle(1, TBBS_WRAPPED | TBBS_SEPARATOR);
	SetButtonStyle(3, GetButtonStyle(0) | TBBS_WRAPPED);
	SetButtonStyle(5, GetButtonStyle(0) | TBBS_WRAPPED);
	SetButtonStyle(7, GetButtonStyle(0) | TBBS_WRAPPED);
	SetButtonStyle(9, GetButtonStyle(0) | TBBS_WRAPPED);
	SetButtonStyle(11, GetButtonStyle(0) | TBBS_WRAPPED);
	SetButtonStyle(13, GetButtonStyle(0) | TBBS_WRAPPED);
	
	// set the border width of the toolbar :
	// up and down border : 5 | left and right border : 10
	this->SetBorders(6, 10, 6, 10);

	return 0;
}
